/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.sys.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.TreeEntity;

/**
 * 列内容管理Entity
 * @author Genie
 * @version 2016-05-11
 */
public class Column extends TreeEntity<Column> {
	
	private static final long serialVersionUID = 1L;
	private String className ;		// 类名
	private String columnName;		// 数据库列名

	private String roleId;
	private String userId;
	
	public Column() {
		super();
	}
	public Column(String id){
		super(id);
	}

	@Override
	public String toString() {
		return "Column [className=" + className + ", columnName=" + columnName + ", roleId=" + roleId + ", userId="
				+ userId + ", parent=" + parent + ", parentIds=" + parentIds + ", name=" + name + ", sort=" + sort
				+ ", remarks=" + remarks + ", createBy=" + createBy + ", createDate=" + createDate + ", updateBy="
				+ updateBy + ", updateDate=" + updateDate + ", delFlag=" + delFlag + ", id=" + id + ", currentUser="
				+ currentUser + ", page=" + page + ", sqlMap=" + sqlMap + ", isNewRecord=" + isNewRecord
				+ ", getParent()=" + getParent() + ", getColumnName()=" + getColumnName() + ", getClassName()="
				+ getClassName() + ", getUserId()=" + getUserId() + ", getRoleId()=" + getRoleId() + ", getParentIds()="
				+ getParentIds() + ", getName()=" + getName() + ", getSort()=" + getSort() + ", getParentId()="
				+ getParentId() + ", getRemarks()=" + getRemarks() + ", getCreateBy()=" + getCreateBy()
				+ ", getCreateDate()=" + getCreateDate() + ", getUpdateBy()=" + getUpdateBy() + ", getUpdateDate()="
				+ getUpdateDate() + ", getDelFlag()=" + getDelFlag() + ", getId()=" + getId() + ", getCurrentUser()="
				+ getCurrentUser() + ", getPage()=" + getPage() + ", getSqlMap()=" + getSqlMap() + ", getIsNewRecord()="
				+ getIsNewRecord() + ", getGlobal()=" + getGlobal() + ", getDbName()=" + getDbName() + ", toString()="
				+ super.toString() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode() + "]";
	}
	@JsonBackReference
	public Column getParent() {
		return parent;
	}

	public void setParent(Column parent) {
		this.parent = parent;
	}

	@Length(min=0, max=64, message="列长度必须介于 0 和 64 之间")
	public String getColumnName() {
		return columnName;
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	@Length(min=0, max=64, message="列长度必须介于 0 和 64 之间")
	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	
	
}